package ifpb.eda.reduceIMG;

import java.awt.Graphics2D;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;

import javax.imageio.ImageIO;

public class Principal {
	
	
	public static void main(String[] args) {
		
		ManipulaImagem manipulaImagem = new ManipulaImagem("E:\\Imagens\\img.jpg");  
		
        BufferedImage new_img = new BufferedImage(manipulaImagem.getImage().getWidth(null), manipulaImagem.getImage().getHeight(null), BufferedImage.TYPE_INT_RGB);
        Graphics2D g = new_img.createGraphics();
        g.drawImage(manipulaImagem.getImage(), 0, 0, manipulaImagem.getImage().getWidth(null), manipulaImagem.getImage().getHeight(null), null);
        try {
			ImageIO.write(new_img, "JPG", new File("E:\\Imagens\\Comprovante.jpg"));
		} catch (IOException e) {
			e.printStackTrace();
		}
		
	}

}